<!doctype html>
<html lang="en">

<head>
	<title><%= title %></title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<!-- VENDOR CSS -->
	<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="assets/vendor/linearicons/style.css">
	<!-- MAIN CSS -->
	<link rel="stylesheet" href="assets/css/main.css">
	<!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
	<link rel="stylesheet" href="assets/css/demo.css">
	<!-- GOOGLE FONTS -->
	<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
	<!-- ICONS -->
	<link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
	<link rel="icon" type="image/png" sizes="96x96" href="assets/img/favicon.png">
    <script src="/BackStage/js/jquery-1.8.3.js"></script>
    <style>
        .mytext{
            display: block;
            width: 100%;
            height: 34px;
            padding: 6px 12px;
            font-size: 14px;
            /* line-height: 1.42857143; */
            color: #555;
            background-color: #fff;
            background-image: none;
            border: 1px solid #ccc;
            border-radius: 4px;
            /* -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); */
            /* box-shadow: inset 0 1px 1px rgba(0,0,0,.075); */
            /* -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; */
            /* -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; */
            /* transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; */
        }
    </style>
</head>


<body onload="findstaffName();">
	<!-- WRAPPER -->
	<div id="wrapper">
		<!-- NAVBAR -->
		<!-- 头部开始 -->
	<%- include top %>
	<!-- 头部结束 -->
		<!-- END NAVBAR -->
		<!-- LEFT SIDEBAR -->
		<!-- 左侧菜单开始 -->
		<%- include left %>
		<!-- 左侧菜单结束 -->
		<!-- END LEFT SIDEBAR -->
		<!-- MAIN -->
		<div class="main">
			<!-- MAIN CONTENT -->
			<div class="main-content">
				<div class="container-fluid" id="inboxmail">
                    <!-- 信箱的容器 -->
                    <div class="panel" style="width:800px;">
                            <div class="panel-heading">
                                <h3 class="panel-title">写信箱</h3>
                            </div>
                            <div class="panel-body">
                                <form action="/message/sendmail" enctype='multipart/form-data' method="post">
                                    <input type="text" id="myusername" name="staffName" style="display:none;" >
                                    <span>收信人编号:&nbsp;&nbsp;</span>
                                    <input type="text" list="browsers" name="staffNo"  style="border: 1px solid #ccc;" >
                                    <datalist id="browsers">
                                    </datalist>
                                    <br>
                                    <p style="margin-top:10px;">主题:&nbsp;&nbsp;</p><input type="text" class="mytext" name="mailtitle"  placeholder="主题">
                                    <br>
                                    <p>内容:&nbsp;&nbsp;</p>
                                    <textarea class="form-control" placeholder="主要内容" name="mailContant" rows="4"></textarea>
                                    <br>
                                    <p>图片:&nbsp;&nbsp;</p>
                                    <label class="fancy-radio">
                                        <input name="IMAGE" style="border:0px;color: #555;width:180px;" type="file" >
                                    </label>
                                    <br>
                                    <input type="submit" style="background:#fff;border: 1px solid #ccc;color: #555;" value="发送" title="发送" />
                                    <input type="reset" style="margin-left:20px;background:#fff;border: 1px solid #ccc;color: #555;" value="重置" title="重置" />
                                </form>
                            </div>
                        </div>
				</div>
			</div>
			<!-- END MAIN CONTENT -->
		</div>
		<!-- END MAIN -->
		<div class="clearfix"></div>
		<footer>
			<div class="container-fluid">
				<!-- <p class="copyright">Copyright &copy; 2017.Company name All rights reserved.More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p> -->
			</div>
		</footer>
	</div>
	<!-- END WRAPPER -->
	<!-- Javascript -->
	<script src="assets/vendor/jquery/jquery.min.js"></script>
	<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="assets/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
	<script src="assets/scripts/klorofil-common.js"></script>
    <script>
        function findstaffName(){
            $("#myusername").val($('#username').text());
            var hp = new XMLHttpRequest();
            hp.open('get', '/message/findstaffName', true);
            hp.send();
            hp.onreadystatechange = function () {
                if (hp.status == 200) {
                    if (hp.readyState == 4) {
                        var datas = eval("(" + hp.responseText + ")");
                        // var depart = document.getElementById('browsers');
                        // depart.options.length=0; 
                        for(var i=0;i<datas.length;i++){
                            // depart.options.add(new Option(datas[i].name));
                            $("#browsers").append('<option label="'+datas[i].name+'" value="'+datas[i].no+'"></option>');
                        }
                    }
                }
            }
        }
    </script>
</body>

</html>
